import { request } from "../../utils/request";
import { ElMessage } from "element-plus";
import useUserStore from "../../store/user";
// 上传文件
export const upLoad = async (file) => {
  return request(
    {
      url: 'api/lab/admin/v1/file/upload',
      method: 'post',
      data: file,
      headers: {
        'Content-Type': 'multipart/form-data'
      }
    }
  )
}

// 获取业务最近图片
export const getRecentOperationPict = async (operationId) => {
  return request({
    url: `/api/lab/admin/v1/image/camera/last-image-list`,
    method: 'get',
    params: {
      id: operationId
    }
  })
}


// 获取图片
export const getPhotoOperationPict = async (deviceId) => {
  return request({
    url: `/api/lab/admin/v1/image/camera/page-image-list`,
    method: 'get',
    params: {
      deviceId: deviceId,
      pageNo: 1,
      pageSize: 10
    }
  })
}
